<template>
	<view class="content">
		<!-- banner -->
		<view class="banner">
			<image src="../../static/banner.jpg" mode=""></image>
		</view>
		<view class="contents">
			<view class="yuan">
				<view class="text">今日步数</view>
				<view class="bushu">0</view>
			</view>
			<view class="butt">
				<button @click="jump()">立即参与</button>
			</view>
			
		</view>
		<view class="" v-for="(item,index) in datas" :key="index">
			{{item.name}}
			111
		</view>
		<view class="arrow">
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				datas:[]
			}
		},
		onLoad() {
			this.$api.baseName().then(res => {
				console.log(res.data)
				this.datas = res.data.data
			}).catch(err => {
				console.log(err)
			})

		},
		methods: {
			jump:function(){
				uni.switchTab({
					url:'../route/luxian'
				})
			},
			

		}
	}
</script>

<style>
	.banner image{display: block;width: 100%;}
	.contents{border-radius: 20px 20px 0 0;background-color: #fff;padding: 30px 0;box-sizing: border-box;}
	.yuan{height:100px ;width:100px;border-radius: 50%;margin: 0 auto;border: 5px solid #f00;background-color:white;}
	.yuan .text{text-align: center;margin: 0 ;box-sizing: border-box;font-size: 14px;padding: 25px 0 10px 0;}
	.bushu{text-align: center;color: #f00;}
	.butt{padding:15px 0;box-shadow: 1px 1px 15px #ccc;box-sizing: border-box;width: 90%;margin:30px auto;}
	button{width:90%;display: block;margin:10px auto;background-color: #f00;color: aliceblue;border-radius: 20px;line-height:50px;font-size: 16px;}
</style>
